package com.student.liu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.student.liu.entity.ShopCar;

import java.util.Map;

public interface IShopCarService extends IService<ShopCar> {

    /**
     * 加入购物车
     */
    void addShopCar(ShopCar shopCar);

    /**
     * 删除购物车
     */
    void removeShopCar(Integer id);

    /**
     * 查询购物车
     */
    IPage<Map<String,Object>> shopCarPage(Integer pageIndex, Integer pageSize);

    /**
     * 修改数量
     * @param shopCarId
     */
    void setInventory(Integer shopCarId,Short inventory);
}
